package api

import (
	"GIN-API/global"
	"GIN-API/internal/handlers"
	"GIN-API/internal/repository"
	"GIN-API/internal/service"
	"github.com/gin-gonic/gin"
)

func InitAuthRouter(r *gin.Engine) {
	authHandler := handlers.NewAuthHandler(service.NewUserService(repository.NewUserRepo(global.DB)))
	//r.GET("/login", authHandler.ShowLoginPage)
	r.POST("/login", authHandler.Login)
	//r.GET("/register", authHandler.ShowRegisterPage)
	r.POST("/register", authHandler.Register)
}
